/**
 * @class BaseContextClass是一个基础类能被继承,
 * 在上下文级别中被实例化,
 * {@link Helper}, {@link Service} 继承了它.
 */
class BaseContextClass {

  /**
   * @constructor
   * @param {Context} ctx - 上下实例
   */
  constructor(ctx) {
    /**
     * @member {Context} BaseContextClass#ctx
     */
    this.ctx = ctx;

    /**
     * @member {Application} BaseContextClass#app
     * @since 1.0.0
     */
    this.app = ctx.app;

    /**
     * @member {Config} BaseContextClass#config
     * @since 1.0.0
     */
    this.config = ctx.app.config;

    /**
     * @member {Service} BaseContextClass#service
     * @since 1.0.0
     */
    this.service = ctx.service;
  }
}

module.exports = BaseContextClass;
